package lzzy.demo.entity;


import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import java.util.List;

@Entity(name = "t_article")
@Data
public class Article {
private  Integer id;


@Column(name="title",columnDefinition = "varchar(200)")
    private  String title;

@Column(name="title",columnDefinition = "longtext")
    private  String  content;


@JoinColumn(name="a_id")
private List<Comment> commentList;


@OneToMany(mappedBy ="article")
private List<Comment> getCommentList;}